<template>
  <div class="fancy-interface">
    <h1 class="fancy-title">{{ msg }}</h1>
    <div class="fancy-content" v-if="msg=='激活成功!'">
      <img class="fancy-image" src="http://5b0988e595225.cdn.sohucs.com/images/20171031/ee07be65f7ee4a2b953c6bf799b11b4f.gif" alt="Fancy Image">
    </div>
  </div>
</template>

<style scoped>
.fancy-interface {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f5f5f5;
}

.fancy-title {
  font-size: 36px;
  font-weight: bold;
  color: #333;
  margin-top: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.fancy-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}

.fancy-text {
  font-size: 24px;
  color: #555;
  margin-bottom: 20px;
}

.fancy-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
}

</style>

<script>

export default {
  data() {
    return {
      msg:"正在激活。。。"
    };
  },
  methods: {
    getActivetionData(){
      var href = window.location.href;
      console.log("href:::"+href)
      if (href.indexOf("id=")!=-1){//找到有这个id参数
        var shopId = href.substring(href.indexOf("id=")+3, href.length)
        console.log("shopid=--"+shopId)
        // 发请求
        this.$http.get("/shop/activation/"+shopId)
            .then(result=>{
              result = result.data
              if (result.success){
                this.$message({message: '激活成功', type: 'success' });
                this.msg = result.resultObj
              }else{

                this.$message({message: '激活失败', type: 'danger' });
                this.msg=result.msg
              }
            })
            .catch(result=>{

            })

      }

    }

  },
  mounted() {
    this.getActivetionData();
  }
}

</script>

